package com.example.springboottemplate.Utiles.ThreadLocal;

public class ThreadLocal<T> {
    private static final java.lang.ThreadLocal<Object> threadLocal = new java.lang.ThreadLocal<>();

    public static <T> void saveUser(T user) {
        threadLocal.set(user);
    }

    public static <T> T getUser() {
        return (T) threadLocal.get();
    }

    public static void removeUser() {
        threadLocal.remove();
    }
}
